package com.itheima.app.controller;

import com.itheima.app.interceptor.UserHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class HuanxinController {
	//获取环信用户信息
    @GetMapping(value = "/huanxin/user")
    public Map<String, String> huanxinUser() {
        Long username = UserHolder.getUser().getId();

        Map<String, String> result = new HashMap<>();
        result.put("username", username.toString());
        result.put("password", "123456");

        return result;
    }
}